{% extends "news_layout.html" %}


{% block btns %}
<span id="allNews" class="my-btn sidebar-item pointer">ALL NEWS</span>
<span id="allEvents" class="my-btn sidebar-item pointer">ALL EVENT</span>
{% endblock %}

{% block search %}
<div class="search">
  <p class="tip">NEWS SEARCH</p>
  <div class="input-group">
    <input type="text" class="form-control" placeholder="Search for...">
    <span class="input-group-btn">
      <button class="btn btn-default" type="button">Search</button>
    </span>
  </div>
</div>
{% endblock %}

{% block calendar %}
<div class="auto-kal calendar-wrapper" id="calendar-wrapper"></div>
{% endblock %}

{% block archives %}
<div class="archives">
  <p class="tip">NEWS ARCHIVE</p>
  <ul>
    <li>2020</li>
    <li>2019</li>
    <li>2018</li>
    <li>2017</li>
    <li>2016</li>
  </ul>
</div>
{% endblock %}

{% block main %}
{% if isDetail %}
<div class="main">
  <h1 class="news-detail__title">{{ pageData.eventtitle }}</h1>
  {{ helper.shtml(pageData.eventtext) }}
</div>
{% elif pageData.rows.length > 0 %}
<div class="main">
  <div class="event-container">
    <a href="/events?id={{ pageData.rows[0].eventid }}">
      <div class="item event-one pointer">
        <div class="item time t-a-c">
          <p class="month">{{ pageData.rows[0].eventdate | monthFilter }}</p>
          <p class="day">{{ pageData.rows[0].eventdate | dayFilter }}</p>
        </div>
        <div class="desc">
          <p>{{ pageData.rows[0].eventtitle }}</p>
          <p>{{ pageData.rows[0].address }}</p>
        </div>
      </div>
    </a>
    {# {% endif %} #}
    {# {% elif pageData.rows.length > 1　%} #}
    <a href="/events?id={{ pageData.rows[1].eventid }}">
      <div class="item event-two">
        <div class="item time t-a-c">
          <p class="month">{{ pageData.rows[1].eventdate | monthFilter }}</p>
          <p class="day">{{ pageData.rows[1].eventdate | dayFilter }}</p>
        </div>
        <div class="desc">
          <p>{{ pageData.rows[1].eventtitle }}</p>
          <p>{{ pageData.rows[1].address }}</p>
        </div>
      </div>
    </a>
    <div class="item event-item__wrapper-vertical">
      <div class="item event-three">
        <div class="time">
          <p>{{ pageData.rows[2].eventdate | monthFilter }}</p>
          <p>{{ pageData.rows[2].eventdate | dayFilter }}</p>
        </div>
        <div class="desc">
          <p>{{ pageData.rows[2].eventtitle }}</p>
          <p>{{ pageData.rows[2].address }}</p>
        </div>
      </div>
      <div class="item event-four">
        <div class="desc">
          <p>{{ pageData.rows[3].eventtitle }}</p>
          <p>{{ pageData.rows[3].address }}</p>
        </div>
        <div class="time">
          <p>{{ pageData.rows[3].eventdate | monthFilter }}</p>
          <p>{{ pageData.rows[3].eventdate | dayFilter }}</p>
        </div>
      </div>
    </div>
    <div class="item event-item__wrapper-horizontal">
      <div class="item event-five">
        <div class="time t-a-c f-l">
          <p class="month">{{ pageData.rows[4].eventdate | monthFilter }}</p>
          <p class="day">{{ pageData.rows[4].eventdate | dayFilter }}</p>
        </div>
        <div class="desc t-a-c">
          <p>{{ pageData.rows[4].eventtitle }}</p>
          <p>{{ pageData.rows[4].address }}</p>
        </div>
      </div>
      <div class="item event-six">
        <div class="time t-a-c">
          <p class="month">{{ pageData.rows[5].eventdate | monthFilter }}</p>
          <p class="day">{{ pageData.rows[5].eventdate | dayFilter }}</p>
        </div>
        <div class="desc t-a-c">
          <p>{{ pageData.rows[5].eventtitle }}</p>
          <p>{{ pageData.rows[5].address }}</p>
        </div>
      </div>
      <div class="item event-seven">
        <div class="desc t-a-c">
          <p>{{ pageData.rows[6].eventtitle }}</p>
          <p>{{ pageData.rows[6].address }}</p>
        </div>
        <div class="time t-a-c f-r">
          <p class="month">{{ pageData.rows[6].eventdate | monthFilter }}</p>
          <p class="day">{{ pageData.rows[6].eventdate | dayFilter }}</p>
        </div>
      </div>
      <div class="item event-eight">
        <div class="time t-a-c">
          <p class="month">{{ pageData.rows[7].eventdate | monthFilter }}</p>
          <p class="day">{{ pageData.rows[7].eventdate | dayFilter }}</p>
        </div>
        <div class="desc t-a-c">
          <p>{{ pageData.rows[7].eventtitle }}</p>
          <p>{{ pageData.rows[7].address }}</p>
        </div>
      </div>
    </div>
    <div class="item event-night">
      <div class="time t-a-c">
        <p class="month">{{ pageData.rows[8].eventdate | monthFilter }}</p>
        <p class="day">{{ pageData.rows[8].eventdate | dayFilter }}</p>
      </div>
      <div class="desc t-a-c">
        <p>{{ pageData.rows[8].eventtitle }}</p>
        <p>{{ pageData.rows[8].address }}</p>
      </div>
    </div>

    {% include "components/pagination.html" %}
  </div>
</div>
{% else %}
<div class="main">
  <p>暂无内容</p>
</div>
{% endif %}
{% endblock %}
